package com.cobra.rdd.operator.action

import org.apache.spark.{SparkConf, SparkContext}

object Spark09_RDD_Operator_CountByValue {
  def main(args: Array[String]): Unit = {

    val sparkConf = new SparkConf().setMaster("local[*]").setAppName("Spark09_RDD_Operator_CountByValue")
    val sc = new SparkContext(sparkConf)
    val rdd = sc.makeRDD(List(4,2,3,1))
    val intToLong = rdd.countByValue()
    println(intToLong)
    sc.stop()
  }
}
